$(function() {
	personLook();
});

//文字数量监听
function limitTextarea(self, nowleng) {
	$(self).on('input propertychange', function(event) {
		var _val = $(self).val();
		_val = _val < 120 ? _val : _val.substr(0, 120);
		$(self).val(_val);
		$(nowleng).text(_val.length)
	});
	$(self).blur(function() {
		$(self).off('input propertychange');
	});
};

//遍历
var personLook = function(callback) {
	$.ajax({
		type: "get",
		url: window.address + "/user/findBayUserUuid",
		xhrFields: {
			withCredentials: true
		},
		crossDomain: true,
		data: '',
		dataType: "json",
		success: function(data) {
			//console.log(data, 22222)
			callback && callback(data);
		}
	});
}

//修改
var personRevise = function(params, callback) {
	$.ajax({
		type: "get",
		url: window.address + "/user/userUpdate",
		xhrFields: {
			withCredentials: true
		},
		crossDomain: true,
		data: params,
		dataType: "json",
		success: function(data) {
			//console.log(data, 11111)
			callback && callback(data);
		}
	});
};